#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
using ull = unsigned long long;
const int N = 1e4 + 5;

int n;
ull a[N];
string s[N];
ull Hash(string s) {
  ull res = 1;
  for (char c : s) {
    res = res * 131 + c - 'a';
  }
  return res;
}

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  rep(i, 1, n) cin >> s[i];
  rep(i, 1, n) a[i] = Hash(s[i]);
  sort(a + 1, a + n + 1);
  int num = unique(a + 1, a + n + 1) - a - 1;
  cout << num;
  return 0;
}